package main

import "fmt"

type Student struct {
	Age int
}
type Person struct {
	Age int
}

func main() {
	var s Student = Student{10}
	var p Person = Person{10}
	s = Student(p) // 强制转换
	fmt.Println(s) // {10}
	fmt.Println(p) // {10}

	var s1 Student = Student{18}
	var s2 Stu = Stu{19}
	s1 = Student(s2)	// 虽然是别名,一样要强制转换
	fmt.Println(s1) // {19}
	fmt.Println(s2) // {19}
}

// 给Student取了个别名
type Stu Student
